package com.test.testCode.java8;

import org.springframework.util.StringUtils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class TT {
    public static void main(String[] args) {
        String url = "http://114.115.139.217:9002/auth/login";
        Boolean token = getUrlToken(url);
        System.out.println(token);
    }

    public static Boolean getUrlToken(String url) {
        Pattern pattern = Pattern.compile("(/)login");
        Matcher matcher = pattern.matcher(url);
        while (matcher.find()) {
            String token = matcher.group();
            if (!StringUtils.isEmpty(token)) {
                return true;
            }
        }
        return false;
    }
}
